package club.kingyin.easycache.utils;

import java.io.EOFException;
import java.net.ConnectException;
import java.net.SocketException;
import java.net.SocketTimeoutException;

public class ExceptionUtils {

    public static boolean belongToNetWorkException(Exception e) {
        Throwable cause = e.getCause();
        return SocketTimeoutException.class.equals(cause.getClass()) || ConnectException.class.equals(cause.getClass()) || SocketException.class.equals(cause.getClass()) || EOFException.class.equals(cause.getClass());
    }

}
